package com.atstudy.ticket;

/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2022/12/23 9:48
 * @copyright: 博为峰
 */
public class Ticket01 extends Thread {

    public static int num = 100;
    public boolean flag = true;

    @Override
    public void run() {
        while (flag) {
            if (num > 0) {
                System.out.println(Thread.currentThread().getName() + "," + num--);
            } else {
                flag = false;
            }
        }
    }
}
